package com.xiaofei.mapper;

import com.xiaofei.pojo.dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DeptMapper {

    @Select("select *from java_demo_tails.dept")
    List<dept> getAll();
    @Delete("delete from java_demo_tails.dept where id = #{id}")
    void deleteById(Integer id);
    @Insert("insert into java_demo_tails.dept (name,create_time,update_time) values (#{name},#{createTime},#{updateTime})")
    void addDept(dept dp);
    @Select("select  *from java_demo_tails.dept where id = #{id}")
    dept getById(Integer id);
    void updept(dept dp);
}
